rm -rf .xpi_work_dir/
chmod -R 0777 scribefire-mobile/
mkdir .xpi_work_dir
cp -r scribefire-mobile/* .xpi_work_dir/
cd .xpi_work_dir/

rm -rf `find . -name ".svn"`
rm -rf `find . -name ".DS_Store"`
rm -rf `find . -name "Thumbs.db"`

cd chrome/
zip -rq ../scribefire.jar *
rm -rf *
mv ../scribefire.jar ./
cd ../

rm ~/Desktop/scribefire-mobile.xpi
zip -rq ~/Desktop/scribefire-mobile.xpi *
cd ..
rm -rf .xpi_work_dir/
